package com.tianji.learning.controller;


import com.tianji.learning.domain.dto.ReplyDTO;
import com.tianji.learning.service.IInteractionReplyService;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 互动问题的回答或评论 前端控制器
 * </p>
 *
 * @author xiaomai
 * @since 2023-10-24
 */
@ApiOperation("新增回答或评论相关接口")
@RestController
@RequestMapping("/replies")
@RequiredArgsConstructor
public class InteractionReplyController {
    private  final IInteractionReplyService replyService;
    @PostMapping
    @ApiOperation("新增回答或评论")
    public void saveReply(@RequestBody @Validated ReplyDTO replyDTO) {
        replyService.saveReply(replyDTO);
    }
}
